<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Weather Fetch API</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.bootcss.com/mdui/0.4.2/css/mdui.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/mdui/0.4.2/js/mdui.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="./js/main.js"></script>

    <style>
        .footer {
            position: fixed;
            left: 0px;
            bottom: 0px;
            width: 100%;
            height: 50px;
            background-color: #eee;
            z-index: 9999;
        }

        .image {
            max-width: 100%;
        }
    </style>
</head>

<body class="mdui-theme-primary-pink">
    <div class="mdui-toolbar mdui-color-theme">
        <a href="javascript:;" class="mdui-btn mdui-btn-icon" mdui-drawer="{target: '#left-drawer'}"><i class="mdui-icon material-icons">menu</i></a>
        <span class="mdui-typo-title">Seo Weather</span>
        <div class="mdui-toolbar-spacer"></div>
        <a href="javascript:;" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">search</i></a>
        <a href="javascript:;" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">color_lens</i></a>
        <a href="javascript:;" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">more_vert</i></a>
    </div>

    <div class="mdui-drawer" id="left-drawer">
        <ul class="mdui-list">
            <li>
                <img class="image" src="./assets/card.jpg" />
            </li>
            <li class="mdui-list-item mdui-ripple" onclick="window.open('https://github.com/xuyang1638');">
                <div class="mdui-list-item-content">Author</div>
            </li>
            <li class="mdui-list-item mdui-ripple" onclick="window.open('https://github.com/xuyang1638');">
                <div class="mdui-list-item-avatar"><img src="./assets/headimg.png" /></div>
                <div class="mdui-list-item-content">Xuyang1638</div>
                <div class="mdui-list-item-text mdui-list-item-one-line">
                    <span class="mdui-text-color-theme-text">
                        Github
                    </span>
                </div>
            </li>
        </ul>
        <div style="text-align:center;" class="footer">
            <button class="mdui-btn mdui-ripple mdui-color-theme footer" mdui-drawer-close>
                CLOSE
            </button>
        </div>
    </div>

    <div class="mdui-container">
        <div id="viewer">
            <div class="mdui-card">
                <div class="mdui-card-media">
                    <img src="./assets/card.jpg" />
                    <div class="mdui-card-media-covered mdui-card-media-covered-gradient">
                        <div class="mdui-card-primary">
                            <h1 class="mdui-card-primary-title" id="cityname">City</h1>
                            <h2 class="mdui-card-primary-subtitle" id="temp">Temp</h2>
                        </div>
                    </div>
                </div>
            </div>
            <div class="mdui-card-content">
                <div class="mdui-typo">

                    <!-- Today Information Area -->
                    <div id="air-humidity"></div>
                    <div id="weather-type"></div>
                    <div id="nowTemp"></div>

                </div>
            </div>
            <div class="mdui-card-actions">
                <button class="mdui-btn mdui-ripple mdui-color-theme" onclick="mdui.snackbar('正在获取最新的天气数据......');changeContent(getWeather('now'));">获取天气数据</button>
                <button class="mdui-btn mdui-ripple mdui-color-theme" onclick="mdui.snackbar('正在获取最新的天气数据......');changeContent(getWeather('tomorrow'));">查看明天的天气预报</button>
            </div>
        </div>
        <p id="cityname"></p>
        <p id="temp"></p>
        <p id="weather"></p>
    </div>
    </div>

    <script>
        //
    </script>
</body>

</html>